package c.h.a.x;

import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.os.Environment;
import android.widget.Toast;
import com.liuzh.deviceinfo.provider.ContentFileProvider;
import java.io.File;

/* compiled from: OperationUtils */
public class r {
    public static final File a = new File(Environment.getExternalStorageDirectory(), "DeviceInfo/app/apk/");
    public static final File b = new File(Environment.getExternalStorageDirectory(), "DeviceInfo/app/manifest/");
    public static final File c = new File(Environment.getExternalStorageDirectory(), "DeviceInfo/app/icon/");
    public static final File d = new File(Environment.getExternalStorageDirectory(), "DeviceInfo/export/");

    /* compiled from: OperationUtils */
    public interface a {
        void a();

        void b(long j, long j2);

        boolean stop();
    }

    public static String a(String str, long j) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(str);
        stringBuilder.append("_");
        stringBuilder.append(j);
        stringBuilder.append(".apk");
        return stringBuilder.toString();
    }

    public static String b(String str, long j) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(str);
        stringBuilder.append("_");
        stringBuilder.append(j);
        stringBuilder.append(".png");
        return stringBuilder.toString();
    }

    public static String c(String str, long j) {
        StringBuilder stringBuilder = new StringBuilder();
        stringBuilder.append(str);
        stringBuilder.append("_");
        stringBuilder.append(j);
        stringBuilder.append(".xml");
        return stringBuilder.toString();
    }

    public static void d(Context context, String str) {
        Intent intent = new Intent();
        intent.setAction("android.intent.action.SEND");
        intent.putExtra("android.intent.extra.STREAM", ContentFileProvider.a(new File(str)));
        intent.setType("application/vnd.android.package-archive");
        try {
            context.startActivity(Intent.createChooser(intent, context.getString(2131690354)));
        } catch (ActivityNotFoundException unused) {
            Toast.makeText(context, 2131689838, 0).show();
        }
    }
}
